/*
 * Copyright (C), 2015-2019
 * FileName: Frame
 * Author:   lizhao
 * Date:     2019-02-12 19:53
 * Description: 帧结构
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.lizhaoblog.jjvm.runtime;

/**
 * 〈一句话功能简述〉<br>
 * 〈帧结构〉
 *
 * @author lizhao
 * @date 2019-02-12 19:53
 * @since 1.0.0
 */
public class Frame {
    private Frame lower;// 实现链表
    private LocalVarTab localVarTab;
    private OperandStack operandStack;

    public Frame(int localVarTabSize, int operandStackSize) {
        this.localVarTab = new LocalVarTab(localVarTabSize);
        this.operandStack = new OperandStack(operandStackSize);
    }
    public Frame(LocalVarTab localVarTab, OperandStack operandStack) {
        this.localVarTab = localVarTab;
        this.operandStack = operandStack;
    }

    public Frame getLower() {
        return lower;
    }

    public void setLower(Frame lower) {
        this.lower = lower;
    }

    public LocalVarTab getLocalVarTab() {
        return localVarTab;
    }

    public void setLocalVarTab(LocalVarTab localVarTab) {
        this.localVarTab = localVarTab;
    }

    public OperandStack getOperandStack() {
        return operandStack;
    }

    public void setOperandStack(OperandStack operandStack) {
        this.operandStack = operandStack;
    }
}
